# 装饰器！！！！！01
# foo_add1 excute time:0.03 s
# None

import  time
def foo_add1(a,b):  #累加
    count=1
    while True:
        if count>a**b:
            break
        count+=1

def clock_it_time(func,a,b):#计算另一个函数执行的时间
    start_time=time.time()
    result=func(a,b) #执行这个函数，默认返回none
    end_time=time.time()
    print(f"{func.__name__} excute time:{format(end_time-start_time,'.2f')} s")
    return result

res=clock_it_time(foo_add1,10,5)  #调用clock_it_time
print(res)
